﻿@using System.Globalization
@using Abp.Configuration.Startup
@using Abp.Web.Security.AntiForgery
@using KelonProud.Web.Resources
@inject KelonProud.Timing.AppTimes AppTimes
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IMultiTenancyConfig MultiTenancyConfig
@inject IWebResourceManager WebResourceManager
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, HonkSoft.Web.Mvc

@{
    AbpAntiForgeryManager.SetCookie(Context);
}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="shortcut icon" href="~/favicon.ico">

    <title>@ViewBag.Title</title>

    <environment names="Development">
        <link href="~/lib/jquery-weui/styles/weui.min.css" rel="stylesheet" />
        <link href="~/lib/jquery-weui/styles/jquery-weui.min.css" rel="stylesheet" />
        <link href="~/fonts/wechat/iconfont.css" rel="stylesheet" />
        <link href="~/css/icons.css" rel="stylesheet" />
        <link href="~/css/weui-content.css" rel="stylesheet" />
    </environment>

    <environment names="Staging,Production">
        <link href="~/view-resources/Views/_Bundles/shared-wechat.min.css" rel="stylesheet" asp-append-version="true" />
    </environment>
        <!-- View specific styles -->
        @RenderSection("styles", required: false)

        <script type="text/javascript">
        // This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
        var abp = abp || {};
        abp.appPath = '@ApplicationPath';
        </script>

</head>
<body ontouchstart>
    <environment names="Development">
        <script src="~/lib/jquery/dist/jquery.js" asp-append-version="true"></script>
        <script src="~/lib/jquery-weui/fastclick.js"></script>
        
        <script src="~/lib/abp-web-resources/Abp/Framework/scripts/abp.js" asp-append-version="true"></script>
        <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js" asp-append-version="true"></script>
        <script src="~/js/main.js"></script>
        <script src="~/lib/jquery-weui/jquery-weui.js"></script>
        <script type="text/javascript" src="~/lib/jquery-weui/city-picker.js" charset="utf-8"></script>
    </environment>

    <environment names="Staging,Production">
            <script src="~/view-resources/Views/_Bundles/shared-wechat.min.js" asp-append-version="true"></script>
        </environment>
    <script>
      //  moment.locale('@CultureInfo.CurrentUICulture.Name');

      $.ajax({
          type: "POST",
          url: "/api/TokenAuth/ValidationLoginState",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          async: true,
          timeout: 50000,
          success: function(msg){
                   
          },
          error: function(msg){
              abp.ajax({
                  contentType: 'application/x-www-form-urlencoded',
                  url: "@Url.Action("WeChatLogin", "Account")"
              });
          }
      });

        $(function() {
            FastClick.attach(document.body);
        });
    </script>
    
    <script src="~/AbpServiceProxies/GetAll?v=@(AppTimes.StartupTime.Ticks)" type="text/javascript"></script>
    @RenderBody()

    @RenderSection("scripts", required: false)

<script>
</script>
</body>
</html>
